package com.lc1993929.dubbo.registry.consul;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.registry.Registry;
import com.alibaba.dubbo.registry.support.AbstractRegistryFactory;
import lombok.Setter;

/**
 * Created by LiuChang on 2017/9/11/011.
 * consul的注册工厂，与{@link com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistryFactory}作用相同
 */
public class ConsulRegistryFactory extends AbstractRegistryFactory {

    @Setter
    private ServiceIdGenerator serviceIdGenerator;

    @Override
    protected Registry createRegistry(URL url) {
        return new ConsulRegistry(url, serviceIdGenerator);
    }
}
